1. Field of the Invention
The present invention relates to a switch mechanism, and more specifically to a switch mechanism that is used in a pointing device to decide a rotational direction of a wheel installed on the pointing device.
2. Description of the Prior Art
In computer systems, the use of a windowing operating system to browse, edit or otherwise manipulate data is commonplace. Distinct graphical areas termed windows are displayed on the monitor that is connected to the computer system. Documents are displayed within the confines of the window for perusal by a user. If a document is too large, then only a portion of the document is displayed inside the window. If the user desires to see off-window portions of the document, then a mouse is used to manipulate a scroll bar located on a side of the window to scroll the window, and hence bring the hidden portions of the document into view. For example, if the user desires to browse in a downward direction within the window, the user clicks on a downward arrow sign of the scroll bar (by way of the mouse), and the document will move upward by a predetermined unit, usually by a line of text. Similarly, if the user wants to browse in an upward direction, the user uses the mouse to click on an upward arrow sign of the scroll bar, and the document is scrolled downward. The above is a familiar ground to general computer users, and so nothing more need be said about it.
FIG. 1 is a perspective view of a mechanical mouse 10 with a wheel 14 according to a prior art. The mechanical mouse 10 comprises a housing 12. The wheel 14 is installed in the housing 14, and is capable of rotating clockwise and counterclockwise so as to control a scroll bar on a side of a window to move the scroll bar upward and downward, enabling the user to scroll the window and thus conveniently browse a document. When the user is perusing a portion of a document, the user may rotate the wheel 14 of the mouse 10 clockwise to activate the scroll bar to scroll the document upward. Alternatively, the user may rotate the wheel 14 counterclockwise to activate the scroll bar to scroll the document downward. This is a familiar convenience that is well-know in the art.
FIG. 2 is a perspective view of an inner portion of the mechanical mouse 10. FIG. 3 is a top view of the inner portion of the mechanical mouse 10. As shown in FIG. 2 and FIG. 3, the mechanical mouse 10 further comprises a substrate 16 installed inside the housing 12, an support 20 installed on the substrate 16 having a notch 21, a shaft 18 connected with the wheel 14 rotatably installed inside the notch 21 of the support 20, a first light source 42 and a second light source 44 installed adjacent to the wheel 14 on two ends of the support 20, and a first sensor 32 and a second sensor 34 installed on an opposite side of the wheel 14 at two ends of the upholder 20. The wheel 14 has a rough surface 22, and a plurality of narrow gaps 24 extend along a radial direction as measured from the center of the wheel 14. The first light source 42 and the second light source 44 generate light 46 and light 48, respectively. The first sensor 32 and the second sensor 34 are used to detect the light 46 and light 48 passing through the narrow gaps 24 respectively, and generate corresponding detecting signals.
FIG. 4a is a diagram of output signals of the two sensors 32 and 34 on a time axis when the wheel 14 of the prior art mechanical mouse 10 rotates clockwise. FIG. 4b is a diagram of output signals of the two sensors 32 and 34 on a time axis when the wheel 14 of the prior art mechanical mouse 10 rotates counterclockwise. FIG. 5 is a table contrasting output signals of the two sensors 32 and 34 with time when the wheel 14 of the mechanical mouse 10 rotates clockwise and counterclockwise as shown in FIG. 41and FIG. 4b. When a user rotates the wheel 14, the shaft 18 rotates inside the notch 21 of the support 20. The narrow gaps 24 also rotate, following the wheel 14. The number of narrow gaps 24 is carefully considered in the design of the wheel 14, as are both the spacing between adjacent gaps 24 and the width of the gaps 24. In a corresponding way, the positions of the first sensor 32, the second sensor 34, the first light source 42 and the second light source 44 are carefully selected. These carefully selected parameters enable differentiation of clockwise and counter-clockwise rotation of the wheel by waveform phase analysis of two optically detected signals. When the wheel 14 rotates clockwise and permits the light 46 generated by the first light source 42 to just pass through a narrow gap 24 to the first sensor 32, the first sensor 32 will detect the light 46 and generate an output signal xe2x80x9c1xe2x80x9d (i.e., a high-potential signal). At the same time, the light 48 generated by the second light source 44 is blocked by the spacing between two narrow gaps 24, and so the second sensor 34 is unable to detect the light 48 and generates an output signal xe2x80x9c0xe2x80x9d (i.e., a low-potential signal). Then, as the wheel 14 continues to rotate clockwise, the light 46 generated by the first light source 42 passes through the middle portion of the narrow gap 24, continuing to arrive at the first sensor 32. At the same time, the light 48 generated by the second light source 44 just passes through a narrow gap 24 and arrives at the second sensor 34. Hence, the output signals generated by the first sensor 32 and the second sensor 34 are xe2x80x9c1xe2x80x9d and xe2x80x9c1xe2x80x9d, respectively. Continuing in this manner, it should be clear that the design of the narrow gaps 24 generates a phase discrepancy of 90 degrees between the output signal of the first sensor 32 and the second sensor 34. As the wheel 14 continues to rotate clockwise, the output signals generated by the first sensor 32 and the second sensor 34 become xe2x80x9c0xe2x80x9d and xe2x80x9c1xe2x80x9d, respectively. As the wheel 14 rotates clockwise even more, the output signals generated by the first sensor 32 and the second sensor 34 change to xe2x80x9c0xe2x80x9d and xe2x80x9c0xe2x80x9d, respectively.
Although the wheel 14 is capable of vertical movement along the shaft 18 (i.e., that the wheel 14 is movable up-and-down while rotating inside the notch 21 of the support 20), such movement does not affect the result of the output signals of the corresponding first sensor 32 and the second sensor 34. That is, the phase difference between the output signals of the first sensor 32 and the second sensor 34 remains 90 degrees.
As shown in FIG. 4a, FIG. 4b and FIG. 5, when the wheel 14 rotates clockwise, if the output signal of the first sensor 32 is xe2x80x9c0xe2x80x9d, then the output signal of the second sensor 34 will be xe2x80x9c1xe2x80x9d inside a period t1. The output signal of the sensors 32 and 34 inside period t1 may thus be though of as xe2x80x9c01xe2x80x9d. If the wheel 14 continues to rotate clockwise, the output signal of the sensors 32 and 34 inside period t2 will be xe2x80x9c00xe2x80x9d. The output signal of the sensors 32 and 34 inside period t3 is xe2x80x9c10xe2x80x9d. The output signal of the sensors 32 and 34 inside period t4 is xe2x80x9c11xe2x80x9d. The output signals of the sensors 32 and 34 inside periods t5 and t6 are same as the output signals of the sensors 32 and 34 inside periods t1 and t2, respectively. The output signals of the first sensor 32 and the second sensor 34 are thus periodic over four cycles. To determine whether the wheel 14 is rotating clockwise or counter-clockwise, one need only determine if the arrangement of the output signals of the sensors 32 and 34 changes from xe2x80x9c01xe2x80x9d, xe2x80x9c00xe2x80x9d, xe2x80x9c10xe2x80x9d to xe2x80x9c11xe2x80x9d in the proper sequence. For example, when the output signal of the sensors 32 and 34 changes from xe2x80x9c00xe2x80x9d to xe2x80x9c10xe2x80x9d, it is inferred that the wheel 14 is rotating clockwise. Similarly, when the wheel 14 rotates counterclockwise, the output signals of the first sensor 32 and the second sensor 34 also have four periods in a cycle. The output signal of the sensors 32 and 34 inside period t1 is xe2x80x9c00xe2x80x9d. The output signal of the sensors 32 and 34 inside period t2 is xe2x80x9c01xe2x80x9d. The output signal of the sensors 32 and 34 inside period t3 is xe2x80x9c11xe2x80x9d. The output signal of the sensors 32 and 34 inside period t4 is xe2x80x9c10xe2x80x9d. The output signals of the sensors 32 and 34 inside periods t5 and t6 are same as the output signals of the sensors 32 and 34 inside periods t1 and t2, respectively. Therefore, to decide whether the wheel 14 is rotating counterclockwise, one simply determines if the arrangement of the output signals of the sensors 32 and 34 changes from xe2x80x9c00xe2x80x9d, xe2x80x9c01xe2x80x9d, xe2x80x9c11xe2x80x9d to xe2x80x9c10xe2x80x9d in order. For example, when the output signal of the sensors 32 and 34 changes from xe2x80x9c10xe2x80x9d to xe2x80x9c00xe2x80x9d, it is inferred that the wheel 14 is rotating counterclockwise.
FIG. 6 is a diagram of the output signals of the two sensors 32 and 34 versus time when the wheel 14 of the prior art mechanical mouse 10 rotates clockwise, wherein the width of one narrow gap 24 of the wheel 14 is too small. As shown in FIG. 6, the output signals of the sensors 32 and 34 inside periods t8, t9 and t10 are xe2x80x9c11xe2x80x9d, xe2x80x9c01xe2x80x9d and xe2x80x9c00xe2x80x9d, respectively. If the first sensor 32 receives light 46 that passes through a gap 24 having a gap width that is too small, the phase difference of the output signals of the wheel 14 detected by the sensors 32 and 34 will not be 90 degrees. The output signals of the sensors 32 and 34 inside periods t11 and t12 is xe2x80x9c00xe2x80x9d and xe2x80x9c11xe2x80x9d respectively. As the wheel 14 rotates continues its clockwise rotation, the output signal of the sensors 32 and 34 inside period t13 becomes xe2x80x9c01xe2x80x9d.
Due to a flaw in a gap 24, when the wheel 14 rotates from period t10 to period t11, the output signal of the sensors 32 and 34 does not change, but remains xe2x80x9c00xe2x80x9d. The computer system thus determines that from period t10 to period t11, the xe2x80x9cthe wheel 14 does not rotatexe2x80x9d. When the wheel 14 rotates from period t11 to period t12, the output signal of the sensors 32 and 34 changes from xe2x80x9c00xe2x80x9d to xe2x80x9c11xe2x80x9d. From FIG. 5 it is clear that the output signal of the sensors 32 and 34 never changes from xe2x80x9c00xe2x80x9d to xe2x80x9c11xe2x80x9d, regardless of whether the wheel 14 is rotating clockwise or counterclockwise. The computer system is thus unable to determine the rotational direction of the wheel 14, which may cause the mouse 10 to behave erratically. A similar problem occurs with a counterclockwise rotation of the wheel 14. As the rotational direction of the wheel 14 is determined by the order of the output signals of the two sensors 32 and 34, if the width of a narrow gap 24 of the wheel 14 is too large or too small, incorrect output signals may easily occur, leading to an incorrect determination of the rotational direction of the wheel 14.
It is therefore a primary objective of the present invention to provide a switch mechanism for use inside a pointing device that is capable of accurately determining the rotational direction of a wheel.
The present invention, briefly summarized, discloses a switch mechanism comprising a ratchet, two tappets, and two sensors. The ratchet has a plurality of sawteeth. The tappets are installed at two opposite sides of the ratchet. Each sensor is installed adjacent to the ratchet for generating detecting signals. When the ratchet rotates clockwise, the sawteeth of the ratchet will push one tappet toward its corresponding sensor so as to generate corresponding clockwise detecting signals. When the ratchet rotates counterclockwise, the sawteeth of the ratchet will push the other tappet toward its corresponding sensor so as to generate corresponding counterclockwise detecting signals.
It is an advantage that the switch mechanism of the present invention mouse is able to accurately determine the rotational direction of a wheel using a single detecting signal that is generated by either the first sensor or the second sensor. There is no need for two separate detecting signals.
These and other objectives and advantages of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.